/*
-----------------------------------------------------------------------------
Filename:    PhysXWorld.h
-----------------------------------------------------------------------------

*/
#ifndef __PhysXWorld_h_
#define __PhysXWorld_h_

#include "NxOgre.h"
#include "critter.h"
#include "WaterEmitter.h"
#include "Lake.h"
#include "ActorEntitySceneNode.h";
#include <vector>;
#include "AppSettings.h";
#include "WorldEnums.h"
#include "SceneryFactory.h"



class PhysXWorld
{
public:

	PhysXWorld(void);
    virtual ~PhysXWorld(void);
	void clearAll(void);

	void createScenery(WorldEnums::eSceneryObjects sceneryType, NxOgre::Vec3 position, NxOgre::Scene* mScene, Ogre::SceneManager *mSceneMgr);
	void attachWaterEmitter(Lake* lake, Critter::RenderSystem*  mRenderSystem, Ogre::SceneManager *mSceneMgr, NxOgre::Real PosX, NxOgre::Real PosY, NxOgre::Real PosZ);

	void moveSceneryObject(int actorIndex, WorldEnums::eAngle byAngle, Ogre::Real value);
	void scaleSceneryObject(int actorIndex, Ogre::Real value);
	void setSceneryObjectScale(int actorIndex, Ogre::Vector3 scale);
	void rotateSceneryObject(int actorIndex, int value);
	void setSceneryObjectRotation(int actorIndex, Ogre::Quaternion rotation);
	void deleteSceneryObject(int actorIndex);

	void fireAllEmitters(void);
	void setStaticAllEmitters(void);

	Ogre::StringVector returnActorNames(void);
	Ogre::StringVector returnHolderActorNames(void);
	Ogre::StringVector returnEmitterNames(int holderIndex);

	bool isHolderActor(int actorIndex);
	Lake *getHolderActor(int holderActorIndex);

private:
	SceneryFactory sceneryFactory;

public:
	std::vector<Critter::Body*> *lBoxes;
	std::vector<ActorEntitySceneNode*> *lActors;
};

#endif // #ifndef __PhysXWorld_h_